package singleton.singletonHolder;

/**
 * @Author： yu.Tan
 * @Date: 2020/10/9 10:55
 * @Description: 登记式/静态内部类
 */
public class Singleton {
    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }

    private Singleton() {
    }

    public static Singleton getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
